package com.ruoyi.system.service.impl;

import java.util.Collections;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.MeetingRoomApplicationMapper;
import com.ruoyi.system.domain.MeetingRoomApplication;
import com.ruoyi.system.domain.Employee;
import com.ruoyi.system.service.IMeetingRoomApplicationService;
import com.ruoyi.common.core.text.Convert;

/**
 * 会议室申请记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-01
 */
@Service
public class MeetingRoomApplicationServiceImpl implements IMeetingRoomApplicationService 
{
    @Autowired
    private MeetingRoomApplicationMapper meetingRoomApplicationMapper;

    /**
     * 查询会议室申请记录
     * 
     * @param applicationId 会议室申请记录主键
     * @return 会议室申请记录
     */
    @Override
    public MeetingRoomApplication selectMeetingRoomApplicationByApplicationId(Long applicationId)
    {
        return meetingRoomApplicationMapper.selectMeetingRoomApplicationByApplicationId(applicationId);
    }

    /**
     * 查询会议室申请记录列表
     * 
     * @param meetingRoomApplication 会议室申请记录
     * @return 会议室申请记录
     */
    @Override
    public List<MeetingRoomApplication> selectMeetingRoomApplicationList(MeetingRoomApplication meetingRoomApplication)
    {
        return meetingRoomApplicationMapper.selectMeetingRoomApplicationList(meetingRoomApplication);
    }

    /**
     * 新增会议室申请记录
     * 
     * @param meetingRoomApplication 会议室申请记录
     * @return 结果
     */
    @Override
    public int insertMeetingRoomApplication(MeetingRoomApplication meetingRoomApplication)
    {
        return meetingRoomApplicationMapper.insertMeetingRoomApplication(meetingRoomApplication);
    }

    /**
     * 修改会议室申请记录
     * 
     * @param meetingRoomApplication 会议室申请记录
     * @return 结果
     */
    @Override
    public int updateMeetingRoomApplication(MeetingRoomApplication meetingRoomApplication)
    {
        return meetingRoomApplicationMapper.updateMeetingRoomApplication(meetingRoomApplication);
    }

    /**
     * 批量删除会议室申请记录
     * 
     * @param applicationIds 需要删除的会议室申请记录主键
     * @return 结果
     */
    @Override
    public int deleteMeetingRoomApplicationByApplicationIds(String applicationIds)
    {
        return meetingRoomApplicationMapper.deleteMeetingRoomApplicationByApplicationIds(Convert.toStrArray(applicationIds));
    }

    /**
     * 删除会议室申请记录信息
     * 
     * @param applicationId 会议室申请记录主键
     * @return 结果
     */
    @Override
    public int deleteMeetingRoomApplicationByApplicationId(Long applicationId)
    {
        return meetingRoomApplicationMapper.deleteMeetingRoomApplicationByApplicationId(applicationId);
    }



    @Override
    public List<Employee> selectEmployeesByMinisterId(Long ministerId)
    {
        return meetingRoomApplicationMapper.selectEmployeesByMinisterId(ministerId);
    }
}
